﻿@using Mangix.Mapping.Setting
@model IEnumerable<SettingMapping>

@{
    ViewBag.Title = "基数设置";
}
  
    <h1>@ViewBag.Title</h1>
    <hr />

    <div class="row">
        <div class="col-sm-12">
            <div class="tabbable">
                <ul class="nav nav-tabs padding-16">
                    <li class="active">
                        <a data-toggle="tab" href="#edit-settings">
                            <i class="purple ace-icon fa fa-cog bigger-125"></i>
                            基数设置
                        </a>
                    </li>
                </ul>
                <div class="tab-content profile-edit-tab-content">
                    <div id="edit-settings" class="tab-pane active">
                        <div class="profile-user-info profile-user-info-striped">
                            <div class="profile-info-row">
                                <div class="profile-info-name"></div>

                                <div class="profile-info-value">
                                    @{ 
                                        string reportNum = "0";
                                    }
                                    <a href="javascript:" class="editable editable-click" id="reportNum" data-pk="1" data-title="Enter username">@reportNum</a>
                                </div>
                            </div>
                            <div class="profile-info-row">
                                <div class="profile-info-name" style="width:200px;"> </div>
                                <div class="profile-info-value">
                                    <span class="editable editable-click" id="sendCaptchaNum" data-pk="1">
                                        @{
                                            string smsNum = "0"; 
                                        }
                                        @smsNum
                                    </span>
                                </div>
                            </div>

                            <div class="profile-info-row">
                                <div class="profile-info-name">  </div>

                                <div class="profile-info-value">
                                    <span class="editable editable-click" id="chooseEstateNum" data-pk="1">
                                        @{
                                            string estateNum = "0"; 
                                        }
                                        @estateNum
                                    </span>
                                </div>
                            </div>

                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div> 
<script>
    $(function () {

        $.fn.editable.defaults.mode = 'inline';
        $.fn.editableform.loading = "<div class='editableform-loading'><i class='ace-icon fa fa-spinner fa-spin fa-2x light-blue'></i></div>";
        $.fn.editableform.buttons = '<button type="submit" class="btn btn-info editable-submit"><i class="ace-icon fa fa-check"></i></button>' +
                                    '<button type="button" class="btn editable-cancel"><i class="ace-icon fa fa-times"></i></button>';
        $('#reportNum')
               .editable({
                   ajaxOptions: {
                       type: 'get',
                       dataType: 'json'
                   },
                   spinner: {
                       min: 0,
                       max: 99,
                       step: 1,
                       on_sides: true
                   },
                   type: 'spinner',
                   name: 'reportNum',
                   //url: '',
                   success: function (response) {
                       if (!response.Status) return response.Message;
                   }
               });

        $('#sendCaptchaNum').editable({
            ajaxOptions: {
                type: 'get',
                dataType: 'json'
            },
            type: 'spinner',
            name: 'sendCaptchaNum',
           // url: '',
            spinner: {
                min: 0,
                max: 99,
                step: 1,
                on_sides: true
            },
            success: function (response, newValue) {
                if (!response.Status) return response.Message;
            }
        });
        $('#chooseEstateNum').editable({
            ajaxOptions: {
                type: 'get',
                dataType: 'json'
            },
            type: 'spinner',
            name: 'chooseEstateNum',
           // url: '',
            spinner: {
                min: 0,
                max: 99,
                step: 1,
                on_sides: true
            },
            success: function (response, newValue) {
                if (!response.Status) return response.Message;
            }
        });
    });
</script>
